Added more documentation and balancing