Cleaned up code not related to DB