Fixes and more code-cleanup.
Fixes and more code-cleanup.

calve/cerberus,MacHu-GWU/cerberus-sanhe,nicolaiarocci/cerberus,MacHu-GWU/cerberus-sanhe,dkellner/cerberus,calve/cerberus,funkyfuture/cerberus,pyeve/cerberus,pyeve/cerberus,dkellner/cerberus,funkyfuture/cerberus,nicolaiarocci/cerberus