Fixed #4 (Use inheritance for common database methods)