Cleaned and fixed makefile; work on core and keygen.