Initial commit with all working code