clean up

a big clean up, hopefully I didn't broke something