Refactoring and cleanup code. Multiple methods added for simple, but dynamic mathematical operations