added "index" and "view" actions. Some fixes