Fixed some behavior issues and added hotp mode