First draft of lock library
add some basic documentation