Moved testing code to separate file
Moved session to API as it's being used for multiple projects