Add public visibility to construct methods. And fix code formatting issues.