Final changes

Last prototype. Fixed #12 . Fixed#15 . Fixed #3 Fixed #6