fixed minor issues
moved structure