Added some main code.