Started from scratch - implemented most funcionality