clean up of code

Remove hacks