cleaned up code, cleaned up structure added docs through the readme