Clean up code
Parsing prototype with basic set detection