Re-organizing code, adding lib dir