added key handler / fixed minor loading bugs