Refactored a bunch of the code to use jbuilders instead of weird hash stuff in the code.