Tided file handline and added keysize function.
Added intitial attempts at expanding API.