WIP: working on FIN/RST

Haven't compiled the code for a long time...
WIP: FIN/RST mechanisms.

Haven't be able to compile for a long time...