fixed a bunch of minor bugs such as calculating leap,flip and stay correctly. Verifying that samples are correctly being initialized. Hail Mary time.