Finished all the implementation
Added test for quick encoding