massive code cleanup. still broken :D