Tidy up parse method a bit