Added some stuff and moved others to the library