Don't create a new list of valid markers each iteration
Removed unnecessary if-statement in parse_marker()
Some small refactoring