Fixed permissions and added libraries