Implemented everything. Time to fix output problems.