Properly cleans up on exit now

Change-Id: I636c5c488534cb1355739f87b19053690d47b4d8
Signed-off-by: nixnodes <code@eth.si>
init.c: fixed mem_clean() routine