Added main methods. Fixed formatting issues.