Refactored and started working on threading issues, removed error checking