Fixed few things, added more code