code cleanup, removing useless bits