Made more changes in the code. Added more detailed comments for artists/developers to understand how it works and how to modify.