Changed splitComponents to splitModuleNames. Simplified to not return absolute path. Simplified regex to be easy to understand.