replaced catch with else after if statement
convert restApi uri to entity id in order to retrieve entities from controller
fixed a small bug
cleaned up the code
Merge pull request #392 from ChaoPang/master

Fixed the bugs for download and order