created conf and lib dirs, moved some things to modules. added catchall for die errors