Adding new code with new style structure
cleanup and ajax loading ground work