First commit. Fully functional version.