Tidy up, try to get sessions working