Some code improvements, enhancements and bugfix