General cleanup. Change write to sys_write