Added a lot of more functionality