Your sentences are correct.
Inversion is a very complex topic. Here are some references:
Inversion - English (ESL) Weblog
Inversion in modern written English
Inversion - Inverted sentences for advanced learners of English
Inversions in English Grammar
Inversion. Fowler, H. W. 1908. The King's English
I have very little to add, except that the most common form, I think, transforms subject-verb-adverb into adverb-verb-subject.
The rain came down --> Down came the rain.
In general, I think you should avoid inversion except in set phrases: "neither did he", and some others. See the references. Otherwise very few rules work 100% accurately: inversion relies on the music of the language, and in some (native!) ears it sounds like so much noise.
Student or Learner