Major code cleanup needed?!?!