Added keyboard features, fixed bugs