Fixed bugs. Made things simpler.