code improvement and added short options to some parameters