Cleaned up code. Separated files to prepare for
new peg class