release build bug fix and small improvements

When I've build project in release mode script fails with exec code 1. I fixed it implicitly returning 0. 
Also did small improvements and added release shame.