This is my first git repo and I will post code here as stack overflow had virtually shunned me from their community.