Merge pull request #7 from cdmihai/buildPulse

Build pulse
merged in and fixed some minor issues
now plotting real data
Fix null cycle bug
Pulses without a refactoring stage had a null cycle. This caused the NPE