1. make parser configurable
2. clean up code a bit based on sonar report