refactor WIP
Comment more complex code blocks