Completed build_story()
Fix a minor error
Fix casting errors
Encoding issue fixed