Back & History functionality, some refactoring, build files