Added pointers where they belong, removed consts where they don't belong