Attempted to fix bugs

I attempted to fix the bugs for namespaces and user-defined libraries.
Still does not work.

Will try to fix function declarations now.