refactored capsule parsing and projection into separate files