Assignment fixed, refactored some stuff