Moved code from lib/ to src/