Added documentation and removed unused methods