Code cleanup

after very long time :)