minor cleanup and works on armv7