Refactored the scheme parser a little