fixed bug with showing unpublished articles in cloud
cleaned up some code