Modified some includes and fixed bugs.