clean up and fixes

mostly just making it look like i did something tonight other then playing games. Made db fetching compatible with this cms's api and cleaned up alot of code to make it more streamlined.