Updated comments, cleaned up texture code

Updated comments
Cleaned up texture code