Fix Warnings

Some small Changes to fix the Compiler Warnings
Apparatus is now building with Clang and GCC/MinGW without Warnings