Fixed checkstyle bugs, add MangerFactory and SimpleManagerFactory