Initial working version. Missing deploy function.