Business Logic

Moved business logic code into header file to conform with template
standard.