Fixed the null and encoding issue, added database script to repository.