Cleaned a few things up, finished implementation and simplified.