Limit visibility
Close database in example
Added Javadocs and renamed exception