Added a bunch of funcationality