#396 Moved library code out of bundle