Separated parser code from main class