Futher debugging. Almost all fixed now

Most of this was typos or doctrine related. I switched the structure of
the databse and moved to doctrine. I figured I might as well do both.