Refactored all code I wrote (again)