Moves config checking funtions to lib/config