code cleanup
expose error trough page hash