smaller changes and implemented os_malloc - PLEASE check if correct - pretty unsure!