Added a bunch of neccessary stuff. Basically all changes start from now.