Added an utility function to avoid repeated code, changed added properties to writeable = true and added a check to avoid replacing an existing implementation if available