Cleaned up build file
fixed sphinx warnings
fixed latex/pdf build error