Remove all static and fix all warnings