Major refactoring. Removed dependency on the JSON module by using Dancer's in-built JSON serializer. Removed unused routes. Other minor fixes.