bit more error handling
moved confif to seperate file
added MIT license