Refactored, fixed throwing

ready to go into develop