Lightning Framework Fake Pull Request

I made this PR to myself so that Ioan/Mark can add comments inline if desired.
This removes the pointer from states, but the state itself is still there. This is a mem leak.