Refactored db.lsk method, rewrote tests