Added some new features to make it more flexible
Added compressed version