removed unused typedefs and unexported foreign constants