Fixed #595
Fixed #585
Fixed #585
Cleaned up libs
Fixed #599
Fixed #600