Added more exception handling, changed Nrange to 1..50.