removing error wrapper
getting rid of useless crap
fixed missing declaration