Code cleanup

Correcting bunch of inconsistencies