More edge case handling and refactoring
Handles more edge cases and starts cleanup and code restructuring.
fixes #8 (closed) part of #5 (closed)
Edited by Roan
Handles more edge cases and starts cleanup and code restructuring.
fixes #8 (closed) part of #5 (closed)