Removed client modules and reorganized functions