Partially implemented key lookup + fixes