Added database indexes
Removed unused code
Enhanced some JavaDoc
Formatted code