more refactoring, better parsing and validation