Move library function
Start work on tests