Refactored the directory layout to support different ports