Cleaned up and commented code. Made bootstrapping optional.