Lots of fixes & some libraries that might be useful later