restructured codes with libs folder