Added sidebar. Cleaned up code.