Add functionality, refactor