First Pass Frederickson's Done

Except for examining costs, all subroutines implemented.