refactored, variables now in there own file
lots of refactoring, fixed gainLog