Added linking back to windows builds after merge of linux fixes, cleaned up some main a bit