Removed some dead code
Updated code to match (upcoming) coding standard