Updated files and fixed bugs