Refactor site to factory pattern

TODO: fix table creation