refactor test and code to prepare for scalarmult
implemented scalarmult.
Prepare for encodepoint