Renamed chat_resource -> resource
Removed unused argument from _wins_show_history
Split private message handling to separate functions
Added win create functions for chat and private chat