gs: updated to use config file, fixed bugs