Added the initial (and fully working) version of the code.