Adding all code of the original project.