Big commit after fixing a bunch of minor issues. Also added documentation to manage section.