Refactor/Clean up code