Completed config file implementation and fixed some minor bugs.