Logger system added and some minor improvements.