Add the parseGroup and parseFile

using parseFile has reduced a lot of duplicated code