split things into namespaces
imported ns
split html rendering into smaller functions