Restructured config reading and added bash script