UPDATE: code has become more modularized and setup correctly to support scaling