Fixed some issues. Removed unused methods.