added some code and fix some errors

some minor libraries added (not complete)
fixed some errors in existing ones