refactored test to production code, added test support for fragments, now parsing package declaration, class declaration and imports