Code created based on ideas of mine.