Restructure code
Updated views according to previous changes