Minor memory leaks fixes.
Refactored the creation of the repository details view into one method.
Removed duplicate method declerations.
Removed unwanted code.
Further missing release statements.