Finish initial implementation, code needs to be refactored