Bug fixes, refactored code
Bug fixes, refactored code