Cleaned up hibernate stuff