First draft of almost working project