Fixed routing issue, added remaining todo items.
Fixed template bugs.
Fixed bug in the repr function.