Tidied up makefile.
Fixed bug in not_full key management.