Working! Needs refactoring.