fix layout issue and move lib file to the right place