Removed type safety warnings (or added annotations to the ones that can't be removed)