Code cleanup, removing old code and comments