Creating duo gallery theme function
Using new theme function user profile preprocess
Printing themed gallery to the tpl
Some code clean up