Initial revision

First working version