Fixed plugins not loading from applications.
Added more array helper functions.
Code cleanup.