Initial version

Compiled successfully (not tested).