Fixed Method Headers in SmartAgent

Cleaned up some of the code in smartAgent and added method headers and comments