Major code cleanup - simplified classes