Implemented num-lock layer and various fixes.