Revert "Minor bugfixes and suppressed erroneous compiler warnings"

This reverts commit de5da5ba43c6104cfef7d05c91b7221da7ceb6d0.