Final code cleanup/refactor before adding more features