Cleaned up code
Added sidebar functionality