separate independent components into their own librares. closes #39