restructure to move index code under lib/ and create img/