Main functionality implemented. Ready to be deployed