Added include/import support, some bug fixes