Initial commit: fully functional version