Use minetest.get_gametime instead of os.time.
Miscellaneous style edits.