moving some stuff around
removed useless code