made config cleaner and fixed minor lua error