Adding all the code.