Add the getsize function with tests per #16.