Started modifying some things. A lot of functions are currently broken.