Change cipher functions to static where appropriate.  Removed some unused functions, which may have to be added back later through a proper public API if downstream projects need these.